<?php
$salary = 8000;
$money = $salary - 5000;//应纳税金额 起征点 5000
$tax = 0; // 应该交的税
echo "您的税前工资为:$salary <br>";
echo "当前起征点为:5000<br>";
if($money > 0 ){ // 工资 > 5000 才需要交税
	if($money > 80000){ // >80000 => 45% 有点吓人
		$tax = $money * 45/100;
	}elseif($money > 55000) { // 55000 ~ 80000 => 35% 
		$tax = $money * 35/100;
	} 
	// ... 省略其他
	else{
		$tax = $money * 3/100;
	}
	echo "应交税金额:$money 应交税费:$tax <br>";
	echo "您的税后到手工资为:".($salary - $tax)." <br>";

}else{
	echo "还要多努力才能为国家做贡献";
}
